<div class="admin">
    <div class="tab panel dux-box admin-panel">
        <div class="panel-head"><strong>添加{$name}</strong></div>
        <div class="fixed-empty"></div>
        <form id="myform" name="myform" method="post" action="{:U('add')}">
            <input type="hidden" name="tp" value="{$action}">
            <table class="table tb-type2">
                <tbody>
                    <tr>
                        <td width="10%" class="required"><label class="validation" for="xianshi_name">名称：</label></td>
                        <td width="80%" class="vatop rowform"><input type="text" class="form-control" value="" id="goods_title" datatype="*" name="seckill_title" size="60" /></td>
                        <td class="vatop tips"></td>
                    </tr>
                    <tr>
                        <td class="required"><label class="validation" for="xianshi_explain">数量：</label></td>
                        <td class="vatop rowform"><input type="text" class="form-control" value="" datatype="*" name="seckill_nums" size="60" style="width: 130px;"/></td>
                        <td class="vatop tips"></td>
                    </tr>
                    <tr>
                        <td class="required"><label class="validation" for="xianshi_explain">限购数量：</label></td>
                        <td class="vatop rowform"><input type="text" class="form-control" value="" datatype="*" name="seckill_limit" size="60" style="width: 130px;"/></td>
                        <td class="vatop tips"></td>
                    </tr>
                    <tr>
                        <td class="required"><label class="validation" for="xianshi_explain">单个金额：</label></td>
                        <td class="vatop rowform"><input type="text" class="form-control" value="" datatype="*" name="seckill_price" size="60" style="width: 130px;"/></td>
                        <td class="vatop tips"></td>
                    </tr>
                    <tr>
                        <td class="required"><label class="validation" for="start_time">开始时间：</label></td>
                        <td class="vatop rowform"><input type="text" class="form-control input_small" readonly="readonly" datatype="*" value="" id="query_start_time" name="seckill_start_time"></td>
                        <td class="vatop tips"></td>
                    </tr>
                    <tr>
                        <td class="required"><label class="validation" for="start_time">结束时间：</label></td>
                        <td class="vatop rowform"><input type="text" class="form-control input_small" readonly="readonly" datatype="*" value="" id="query_end_time" name="seckill_end_time"></td>
                        <td class="vatop tips"></td>
                    </tr>
                    <tr>
                        <td class="required"><label class="validation" for="lower_limit">商品：</label></td>
                        <td class="vatop rowform">
                            <span id="addgoods" class="button bg-blue"><i class="icon-plus"></i> 选择商品</span>
                            <span id="goods"></span>
                        </td>
                        <td class="vatop tips"></td>
                    </tr>
                    <tr>
                        <td class="required"><label class="validation" for="xianshi_title">活动规则(说明)：</label></td>
                        <td class="vatop rowform"><textarea name="seckill_describe" class="input input_big" cols="62" rows="5" ></textarea></td>
                        <td class="vatop tips"></td>
                    </tr>
                    <tr>
                        <td class="required">状态：</td>
                        <td class="vatop rowform">
                            <div class="form-group">
                                <div class="field">
                                    <div class="button-group radio">
                                        <label class="button active"><input name="seckill_state" value="1" checked="checked" type="radio"><span class="icon icon-check"></span> 开启</label>
                                        <label class="button"><input name="seckill_state" value="0" type="radio"><span class="icon icon-times"></span> 关闭</label>
                                    </div>
                                </div>
                            </div>
                        </td>
                        <td class="vatop tips"></td>
                    </tr>
                </tbody>
                <tfoot>
                    <tr>
                        <td colspan="3"><input class="button bg-main" type="submit" value="提交"></td>
                    </tr>
                </tfoot>
            </table>
        </form>
    </div>
</div>
<script type="text/javascript">

    $("#myform").Validform({
        tiptype: 3,
        showAllError: true,
    });
    $('#myform').layer({});
    
    $('#query_start_time').duxTime({
        minDate: 0,
        format: "Y-m-d H:i"
    });
    $('#query_end_time').duxTime({
        minDate: 0,
        format: "Y-m-d H:i"
    });
    
    $('#addgoods').on('click',function(){
        layer.open({
          type: 2,
          area: ['700px', '530px'],
          fixed: false, //不固定
          maxmin: true,
          title:'选择商品框',
          content: "{:U('Index/search')}"
        });
    })
    
</script>